/*
 *  analysis.h
 *  EPPI-0.0
 *
 *  Created by Juan Carlos Garcia Orden on 15/11/07.
 *
 */

#ifndef _analysis_h_
#define _analysis_h_

#include <iostream>
#include <map>
#include <vector>
//#include "lmx.h"

using namespace std;

class Process;
class Simulation;

class Analysis
{
public:
	string name;
	string type;
	int dim;
	bool haveToRebuild;		/** Default: simulation structure is kept (false) */
	bool changeLoads;		/** Default: no new loads (false) */
	Simulation* parentSim;
	vector<Process*> vProc;	/** Pointers to processes */
	bool isVelNeeded;		/** Default: velocity vector not needed (false) */
	string graphicsFormat;
    string graphicsPath;	/** Path/To/Folder where graphics data are saved */
    double graphicsStep;	/** Time at which graphics data are saved */
	bool printDofsFlag;
	bool printEnerFlag;
	bool printIterFlag;
	bool printTempFlag;
	bool printEntropyFlag;
	bool printAMFlag;
	bool printConFlag;
	bool printPProjFlag;
	bool printStressFlag;
	bool plotDispFlag;
	bool plotProcFlag;
	bool plotStressFlag;
	bool augLagFlag;
	bool augConvergence;
	bool augConvergenceTot;
	int augIter;
	int maxIterLambda;
	bool calcM;
	int integratorType;
	bool projFlag;
	int autoProjFlag;
	string autoProjType;
	bool implicitFlag;
	bool lumpedMassFlag;
	double h;	//Timestep
	double timeA;
	double timeB;
	double timeC;
	double timeC1;
	//double timeC2;
	double timeD;
	double timeE;
	double timeF;
	double timeF1;
	double timeG;
	double timeG1;
	double timeG2;
	double timeH;
	double timeI;
	bool printTimeFlag;

public:
	Analysis();
        Analysis(string &, string &, int, string &,  string &, double &, Simulation*);
        Analysis(string &, string &, int, bool, bool, string &, string &, double &);
	virtual ~Analysis(){}
	
	void setRebuild(bool op)	{ haveToRebuild = op; }
	void setChangeLoads(bool op)	{ changeLoads = op; }
//	void setProc(const vector<Process*>&);
	
	virtual string getLinSolver()=0;
	virtual string getNlSolver()=0;
	virtual string getIntegrator()=0;
	virtual double getTIni()=0;
	virtual double getTEnd()=0;
	virtual double getTIncre()=0;
	virtual double getBeta()=0;
	virtual double getGamma()=0;
	virtual double getAlpha()=0;

	virtual double calculate()=0;
};

#endif
